﻿using System;

namespace YasharEl.Infrastructure.Diagnostics.Logging
{
    public abstract class BaseLogger<T> : ILogger<T>
    {
        #region Constructors

        protected BaseLogger()
        {
            Type = typeof(T);
        }

        #endregion

        #region Abstract Properties

        public abstract bool IsDebugEnabled { get; }

        public abstract bool IsErrorEnabled { get; }

        public abstract bool IsFatalEnabled { get; }

        public abstract bool IsInfoEnabled { get; }

        public abstract bool IsWarnEnabled { get; }

        #endregion

        #region Properties

        public Type Type { get; private set; }

        #endregion

        #region ILogger<T> Members Abstraction

        public abstract void Debug(string format, params object[] args);
        public abstract void Debug(Exception exception, string format, params object[] args);
        public abstract void Error(string format, params object[] args);
        public abstract void Error(Exception exception, string format, params object[] args);
        public abstract void Fatal(string format, params object[] args);
        public abstract void Fatal(Exception exception, string format, params object[] args);
        public abstract void Info(string format, params object[] args);
        public abstract void Info(Exception exception, string format, params object[] args);
        public abstract void Warn(string format, params object[] args);
        public abstract void Warn(Exception exception, string format, params object[] args);

        #endregion
    }
}
